package com.bio.utils;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Pager<T extends Serializable> implements Serializable {

	private static final long serialVersionUID = -3992154887167970435L;

	public static final Pager EMPTY_PAGE = new Pager();

	protected Pagination pagination = new Pagination();

	protected List<T> result = new ArrayList<T>();

	public Pager() {
	}

	public Pager(Pagination pagination, List<T> result) {
		this.pagination = pagination;
		this.result = result;
	}

	public List<T> getResult() {
		return result;
	}

	public void setResult(List<T> result) {
		this.result = result;
	}

	public Pagination getPagination() {
		if (pagination == null) {
			pagination = new Pagination();
		}

		return pagination;
	}
}
